<?php 
	class HascreateWidget extends Widget{
    public function render($data){
			import('ORG.Util.Page');
			$count = M()->query("select count(*) num from team t,juryproject j,users u where j.Jury=".$_SESSION[C('USER_AUTH_KEY')]['UserId']." and j.TeamId=t.Id");
			$Page = new Page($count[0]['num'],3);
			$show = $Page->show();
			$data['jury'] = M()->query("select t.Id,t.Name,t.Logo,u.IsJury,t.SchoolName,t.Score,j.Jury from team t,juryproject j,users u where j.Jury=".$_SESSION[C('USER_AUTH_KEY')]['UserId']." and j.TeamId=t.Id limit {$Page->firstRow},{$Page->listRows}");
			$data['page'] = $show; 
			$content = $this->renderFile('Hascreate',$data);
			return $content;


		}

	}










 ?>